/**
 * 
 */
package rmi;

/**
 * @author REMY Timothée and CARTIER Arthur
 */
public class Message {

	/**
	 * @uml.property name="author"
	 */
	private String author;

	/**
	 * @uml.property name="id"
	 */
	private String id;

	/**
	 * @uml.property name="message"
	 */
	private String message;

	/**
	 * This constructor is just used form the xml serialization
	 * 
	 */
	public Message() {
		super();
	}

	public Message(final String author, final String id, final String message) {
		super();
		this.author = author;
		this.id = id;
		this.message = message;
	}

	/**
	 * @param anObject
	 * @return
	 * @see java.lang.String#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(final Object anObject) {
		if ((anObject != null) && (anObject instanceof Message)) {
			final Message m = (Message) anObject;
			return id.equals(m);
		}
		return false;

	}

	/**
	 * Getter of the property <tt>author</tt>
	 * 
	 * @return Returns the author.
	 * @uml.property name="author"
	 */
	public String getAuthor() {
		return author;
	}

	/**
	 * Getter of the property <tt>id</tt>
	 * 
	 * @return Returns the id.
	 * @uml.property name="id"
	 */
	public String getId() {
		return id;
	}

	/**
	 * Getter of the property <tt>message</tt>
	 * 
	 * @return Returns the message.
	 * @uml.property name="message"
	 */
	public String getMessage() {
		return message;
	}

	/**
	 * Setter of the property <tt>author</tt>
	 * 
	 * @param author
	 *            The author to set.
	 * @uml.property name="author"
	 */
	public void setAuthor(final String author) {
		this.author = author;
	}

	/**
	 * Setter of the property <tt>id</tt>
	 * 
	 * @param id
	 *            The id to set.
	 * @uml.property name="id"
	 */
	public void setId(final String id) {
		this.id = id;
	}

	/**
	 * Setter of the property <tt>message</tt>
	 * 
	 * @param message
	 *            The message to set.
	 * @uml.property name="message"
	 */
	public void setMessage(final String message) {
		this.message = message;
	}

}
